home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
Me-Mz
/
MegaSort Stack.cpt
/
MegaSort Stack
/
card_2983.txt
< prev
next >
Wrap
Text File
|
1990-12-13
|
3KB
|
89 lines
-- card: 2983 from stack: in
-- bmap block id: 0
-- flags: 4000
-- background id: 2571
-- name:
-- part 26 (button)
-- low flags: 00
-- high flags: A003
-- rect: left=349 top=44 right=66 bottom=449
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sort
----- HyperTalk script -----
on mouseUp
Put AnswerALot("How many keys?",3,2,1,0) into numKeys
Put "Put megaSort(fld Unsorted," & quote & "*" & quote & ",return" into temp
put temp into fld "Command"
repeat with I=1 to numKeys
Put "," & quote after temp
Put return & " ," & quote after fld "Command"
Put answerALot("Which field for key " & I & "?",6,5,4,3,2,1) into it
Put "F=" & it after temp
Put "F=" & it after fld "Command"
Put answerALot("What type of sort for key " & I & "?", "Date","Number","In'tl","ASCII") into it
Put ",T=" & char 1 of it after temp
Put ",T=" & char 1 of it after fld "Command"
Put answerALot("Which direction for key " & I & "?", "Descending","Ascending") into it
Put ",D=" & char 1 of it & quote after temp
Put ",D=" & char 1 of it & quote after fld "Command"
end repeat
Put ") into fld sorted" after temp
Put ") into fld sorted" after fld "Command"
do temp
end mouseUp
-- part 28 (field)
-- low flags: 01
-- high flags: 0001
-- rect: left=310 top=101 right=233 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name:
-- part contents for background part 4
----- text -----
1/24/90*MR395*$22.23*mike**1163
1/3/90*MR305*$10.00*alice*Jéan*1014
1/3/90*MR302*$9.50*Joe*L√∏u*925
1/7/90*MR303*$10.00*Jack*Bòll*1015
1/24/90*MR395*$9.75*nancy**1160
1/3/90*MR301*$10.00*Sue*ΔíIOU*1014
-- part contents for background part 5
----- text -----
1/3/90*MR301*$10.00*Sue*ΔíIOU*1014
1/3/90*MR302*$9.50*Joe*L√∏u*925
1/3/90*MR305*$10.00*alice*Jéan*1014
1/7/90*MR303*$10.00*Jack*Bòll*1015
1/24/90*MR395*$22.23*mike**1163
1/24/90*MR395*$9.75*nancy**1160
-- part contents for background part 6
----- text -----
Put megaSort(fld Unsorted,"*",return
,"F=1,T=D,D=A"
,"F=2,T=A,D=A"
,"F=3,T=N,D=D") into fld sorted
-- part contents for card part 28
----- text -----
This is an example of sorting on multiple fields.
Clicking on the above button will step you through a series of dialogs to build the sort command parameters.